#include <stdio.h>

int main(int argc, char *argv[])
{
    int arr[] = {1, 3, 5, 7, 8, 10, 12, 4, 6, 9, 11, 2};
    int arr_len = sizeof(arr) / sizeof(arr[0]);

    for (int i = 0; i < arr_len - 1; i++) {
        for (int j = 0; j < arr_len - 1 - i; j++) {
            int tmp = arr[j];

            if (arr[j] > arr[j + 1]) {
                arr[j] = arr[j + 1];
                arr[j + 1] = tmp;
            }
        }
    }

    for (int i = 0; i < arr_len; i++) {
        printf("%d ", arr[i]);
    }

    putchar('\n');

    return 0;
}
